package top.riske.imagebed.entity;

import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 文件表
 * created by vital on 2025/3/5 上午8:33
 */
@Data
@Builder
public class CFile {

    private Long id;

    /**
     * 文件哈希，md5值，用于校验文件是否完整
     */
    private String fileHash;

    private Long fileSize;

    /**
     * 文件在本地保存的路径
     */
    private String path;

    private LocalDateTime createdTime;

    private boolean deleted;

    public CFile() {
    }

    public CFile(Long id, String fileHash, Long fileSize, String path, LocalDateTime createdTime, boolean deleted) {
        this.id = id;
        this.fileHash = fileHash;
        this.fileSize = fileSize;
        this.path = path;
        this.createdTime = createdTime;
        this.deleted = deleted;
    }
}
